﻿Public Class Form1
    Dim pic_bitmap_1 As Bitmap
    Dim pic_bitmap_2 As Bitmap
    Dim showing_pic_1 As Boolean

    Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        If e.KeyChar = "a" Then
            Dim SC As New ScreenShot.ScreenCapture
            pic_bitmap_1 = SC.CaptureDeskTopRectangle(New Rectangle(MousePosition.X, MousePosition.Y, _
                                                                                MousePosition.X + 500, MousePosition.Y + 450), 500, 450)
            pic_bitmap_2 = SC.CaptureDeskTopRectangle(New Rectangle(MousePosition.X + 508, MousePosition.Y, _
                                                                                MousePosition.X + 500, MousePosition.Y + 450), 500, 450)
            PictureBox1.Image = pic_bitmap_1
            showing_pic_1 = True
            Timer1.Start()
            If Timer1.Enabled = False Then
                MessageBox.Show("FUck")
            End If
        End If

        If e.KeyChar = "s" Then
            Timer1.Stop()
        End If

        If e.KeyChar = "d" Then
            Timer1.Interval += 50
        End If

        If e.KeyChar = "f" And Timer1.Interval > 50 Then
            Timer1.Interval -= 50
        End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If showing_pic_1 Then
            PictureBox1.Image = pic_bitmap_2
            showing_pic_1 = False
        Else
            PictureBox1.Image = pic_bitmap_1
            showing_pic_1 = True
        End If
    End Sub
End Class
